<?php $myLib=new myLib(); ?>
<?php $scountry = $sf_user->getAttribute('scountry'); ?>
<?php if(count($articulos_mas_puntuados)>0){ ?>
  <div class="destacado">
      <div class="titulo">
          <div class="texto">
              ART&Iacute;CULOS M&Aacute;S PUNTUADOS EN <?php echo strtoupper($scountry->getName()) ?>
          </div>
      </div>
      <div class="contenido borde">
          <div class="interior">
            <?php foreach($articulos_mas_puntuados as $amp){ ?>
              <?php $article = ArticlePeer::retrieveByPK($amp['id']); ?>
              <a href="<?php echo url_for('@article?id='.$article->getId().'&slug='.$article->getSlug()) ?>" title="<?php echo $amp['scores'] ?> puntuaciones">
                  <?php echo $article->getTitle() ?></a>
                <br />
              <span>texto adicional</span>
                <br />
            <?php } ?>
          </div>
      </div>
  </div>
<?php } ?>
<?php if(count($articulos_mas_vistos)>0){ ?>
  <div class="destacado">
      <div class="titulo">
          <div class="texto">
              ART&Iacute;CULOS M&Aacute;S VISTOS EN <?php echo strtoupper($scountry->getName()) ?>
          </div>
      </div>
      <div class="contenido borde">
          <div class="interior">
            <?php foreach($articulos_mas_vistos as $amv){ ?>
              <?php $article = ArticlePeer::retrieveByPK($amv['id']); ?>
              <a href="<?php echo url_for('@article?id='.$article->getId().'&slug='.$article->getSlug()) ?>" title="<?php echo $amv['views'] ?> visitas">
                  <?php echo $article->getTitle() ?></a>
                <br />
              <span>texto adicional</span>
                <br />
            <?php } ?>
          </div>
      </div>
  </div>
<?php } ?>
<?php if(count($articulos_mas_recientes)>0){ ?>
  <div class="destacado">
      <div class="titulo">
          <div class="texto">
              ART&Iacute;CULOS M&Aacute;S RECIENTES EN <?php echo strtoupper($scountry->getName()) ?>
          </div>
      </div>
      <div class="contenido borde">
          <div class="interior">
            <?php foreach($articulos_mas_recientes as $amr){ ?>
              <a href="<?php echo url_for('@article?id='.$amr->getId().'&slug='.$amr->getSlug()) ?>">
                  <?php echo $amr->getTitle() ?></a>
                <br />
              <span><?php echo $myLib->formattedDate($amr->getCreatedAt()) ?></span>
                <br />
            <?php } ?>
          </div>
      </div>
  </div>
<?php } ?>
<?php if(count($autores_mas_leidos)>0){ ?>
  <div class="destacado">
      <div class="titulo">
          <div class="texto">
              AUTORES M&Aacute;S LE&Iacute;DOS EN <?php echo strtoupper($scountry->getName()) ?>
          </div>
      </div>
      <div class="contenido borde">
          <div class="interior">
            <?php foreach($autores_mas_leidos as $aml){ ?>
              <?php $author = AccountPeer::retrieveByPK($aml['owner_id']); ?>
              <a href="<?php echo url_for('@profile?id='.$author->getId()) ?>">
              <?php if(count($array_users)>0){ ?>
                <?php foreach($array_users as $key => $practil_user){ ?>
                  <?php if($practil_user->{'id'} == $author->getPractilAccountId()){ ?>
                    <?php echo $array_users[$key]->{'name'}.' '.$array_users[$key]->{'lastName'}; ?>
                  <?php } ?>
                <?php } ?>
              <?php }else{ ?>
                <?php echo 'Autor Nombre Completo' ?>
              <?php } ?>
              </a>
                <br />
            <?php } ?>
          </div>
      </div>
  </div>
<?php } ?>
  <div class="destacado" style="margin: 10px 0;text-align: center;">
      <iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fplatform&amp;width=292&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=false&amp;header=true&amp;height=290" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:290px;" allowTransparency="true"></iframe>
  </div>